package com.ssuu.ssuusnow.project.manage.log.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ssuu.ssuusnow.model.vo.Pagination;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 *
 * </p>
 *
 * @author sun
 * @since 2023-06-14
 */
@TableName("su_log")
@ApiModel(value = "Log对象", description = "")
@JsonIgnoreProperties(value = {"isdel","pageSize", "currentPage"})
public class Log extends Pagination implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("字典 是否删除   已删除   未删除")
    private boolean isdel;

    public boolean isIsdel() {
        return isdel;
    }

    public void setIsdel(boolean isdel) {
        this.isdel = isdel;
    }

    @ApiModelProperty("描述信息")
    private String description;

    @ApiModelProperty("URL")
    private String url;

    @ApiModelProperty("请求方式")
    private String manner;

    @ApiModelProperty("请求方法")
    private String method;

    @ApiModelProperty("IP")
    private String ip;

    @ApiModelProperty("请求参数")
    private String req;

    @ApiModelProperty("响应参数")
    private String res;

    @ApiModelProperty("用户ID")
    private Long userid;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;


    @ApiModelProperty("企业 ID")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long enterpriseId;

    public Long getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getManner() {
        return manner;
    }

    public void setManner(String manner) {
        this.manner = manner;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getReq() {
        return req;
    }

    public void setReq(String req) {
        this.req = req;
    }

    public String getRes() {
        return res;
    }

    public void setRes(String res) {
        this.res = res;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    @Override
    public String toString() {
        return "Log{" +
                "id=" + id +
                ", description=" + description +
                ", url=" + url +
                ", manner=" + manner +
                ", method=" + method +
                ", enterpriseId=" + enterpriseId +
                ", ip=" + ip +
                ", req=" + req +
                ", res=" + res +
                ", userid=" + userid +
                "}";
    }
}
